package com.situ;

import java.util.Scanner;

import org.junit.Test;

public class shangdain {
	@Test
	public void test(){
		Scanner scanner = new Scanner(System.in);
		System.out.println("请输入单价");
		double danjia = scanner.nextInt();
		Scanner scanner1 = new Scanner(System.in);
		System.out.println("请输入数量");
		double shuliang = scanner1.nextInt();
		Scanner scanner2 = new Scanner(System.in);
		System.out.println("请输入金额");
		double jine = scanner2.nextInt();
		double shou = shuliang * danjia;
		if (shou<500) {
			double zhao = jine - shou;
			if (zhao>=0) {
				System.out.println("应收"+shou);
				System.out.println("找零"+zhao);	
			}else {
				System.out.println("不好意思钱不够");
			}
			
		}else {
			shou=shou*0.8;
			double zhao = jine - shou;
			if (zhao>=0) {
				System.out.println("应收"+shou);
				System.out.println("找零"+zhao);
			}else {
				System.out.println("不好意思钱不够");
			}
		}
	}
	@Test//闰年
	public void test1(){
		Scanner scanner = new Scanner(System.in);
		System.out.println("请输入年份");
		int nian = scanner.nextInt();//
		if (((nian % 4 == 0) && (nian % 100 != 0)) || (nian % 400 == 0)) {
			System.out.println("该年是闰年");
			}else{
				System.out.println("该年是平年");
			
		}
		
	}	
}
